if (self.CavalryLogger) { CavalryLogger.start_js(["RkeFa"]); } __d("FBRTCParticipantCallState",[],(function(a,b,c,d,e,f){e.exports={UNKNOWN:0,DISCONNECTED:1,NO_ANSWER:2,REJECTED:3,UNREACHABLE:4,CONNECTION_DROPPED:5,CONTACTING:6,RINGING:7,CONNECTING:8,CONNECTED:9,PARTICIPANT_LIMIT_REACHED:10,IN_ANOTHER_CALL:11,RING_TYPE_UNSUPPORTED:12}}),null); __d("FBRTCAvailability",["ChannelConstants","PresenceStatus"],(function(a,b,c,d,e,f){"use strict";a={isCallable:function(a){a=b("PresenceStatus").getCapabilities(a);var c=b("ChannelConstants").CAPABILITY_VOIP_INTEROP;return!!(a&c)}};e.exports=a}),null); __d("FBRTCCallUIWrapper",["regeneratorRuntime","Bootloader","UserAgent","gkx"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=null,h={openGroupCallUI:function(a,c,d,e,f,h,i){return b("regeneratorRuntime").async(function(j){while(1)switch(j.prev=j.next){case 0:g=this._openWindow("Group Call"),b("Bootloader").loadModules(["FBRTCCallUI"],function(b){b.openGroupCallUI(a,c,d,e,f,h,g,i)},"FBRTCCallUIWrapper");case 2:case"end":return j.stop()}},null,this)},openGroupCallURI:function(a,c,d,e,f,h,i,j,k){return b("regeneratorRuntime").async(function(l){while(1)switch(l.prev=l.next){case 0:g=this._openWindow("Group Call"),b("Bootloader").loadModules(["FBRTCCallUI"],function(b){b.openGroupCallURI({conferenceName:a,callID:c,hasVideo:d,initializeVideo:e,serverInfoData:i,trigger:j,callSummary:k,callWindow:g,multiwayWwwTier:h,multiwayCoreTier:f})},"FBRTCCallUIWrapper");case 2:case"end":return l.stop()}},null,this)},openAsCaller:function(a,c,d,e){!g&&window.rtcCallChildWindow&&(g=window.rtcCallChildWindow,window.rtcCallChildWindow=null);if(this._shouldFocusCallWindow(a)){g&&g.focus();return}this._shouldCloseCallWindow()&&(g&&g.close());g=this._openWindow("Video Call",{isP2P:!0});b("Bootloader").loadModules(["FBRTCCallUI"],function(b){b.openAsCaller(a,c,d,e,g)},"FBRTCCallUIWrapper")},openAsCallee:function(a,c,d,e,f){g=this._openWindow("Video Call",{isP2P:!0}),b("Bootloader").loadModules(["FBRTCCallUI"],function(b){b.openAsCallee(a,c,d,e,g,f)},"FBRTCCallUIWrapper")},_shouldFocusCallWindow:function(a){return!!g&&!g.closed&&g.rtcCallInProgessWith===a},_shouldCloseCallWindow:function(){return!!g&&!g.closed&&!g.rtcCallInProgessWith},_openWindow:function(a,c){__p&&__p();c=c===void 0?{isP2P:!1}:c;c=c.isP2P;c=c===void 0?!1:c;c=this._windowPosition({isP2P:c});c=["menubar=no","location=no","scrollbars=no","status=no","personalbar=no",c.height,c.width,c.top,c.left].join(",");this._isSparkBrowser()&&(c="");b("gkx")("859726")&&b("Bootloader").loadModules(["RTWebUserActionLogger"],function(a){a.logCheckpoint({checkpoint:"rtc_www_new_tab"})},"FBRTCCallUIWrapper");a=b("gkx")("859726")?window.open("","_blank"):window.open("",a,c);window.callWindow=a;return a},_windowDimension:function(a){a=a.isP2P;var b=960,c=540;screen&&screen.width>1280&&(!a?(b=1100,c=772):(b=1280,c=720));return{height:c,width:b}},_windowPosition:function(a){__p&&__p();a=a.isP2P;a=a===void 0?!1:a;var b,c,d,e;a=h._windowDimension({isP2P:a});var f=a.height;a=a.width;window.innerWidth!==void 0?(c=window.innerWidth,b=window.innerHeight):(c=screen.width,b=screen.height);window.screenLeft!==void 0?(d=window.screenLeft,e=window.screenTop):(d=window.screenX,e=window.screenY);c=Math.floor(c/2-a/2+d);d=Math.floor(b/2-f/2+e);return{height:"height="+f.toString(),width:"width="+a.toString(),top:"top="+d.toString(),left:"left="+c.toString()}},_isSparkBrowser:function(){return b("UserAgent").isBrowser("Chrome < 34")&&b("UserAgent").isBrowser("Chrome > 33")}};e.exports=h}),null); __d("RTWebCallTriggerMapping",["deepFreezeValue"],(function(a,b,c,d,e,f){"use strict";a={chat_sidebar:{surface:"chat_sidebar",component:"recent_calls"},chattab_audio_button:{surface:"chat_tab",component:"audio_button"},chattab_video_button:{surface:"chat_tab",component:"video_button"},messenger_bubble_free_call:{surface:"messenger_bubble",component:"free_call"},messenger_dot_com_missed_call_dialog:{surface:"missed_call_dialog",component:"start_call_button"},messenger_dot_com_video_call:{surface:"messenger_header",component:"video_button"},messenger_dot_com_audio_call:{surface:"messenger_header",component:"audio_button"},timeline:{surface:"dropdown_call_menu",component:"start_call_button"},messenger_dot_com_work_hovercard:{surface:"work_hovercard",component:"start_call_button"},admin_message:{surface:"admin_message",component:"start_call_button"},return_call:{surface:"missed_call_dialog",component:"start_call_button"},popup_start_call_button:{surface:"call_container",component:"start_call_button"},redial_button:{surface:"call_container",component:"redial"}};b("deepFreezeValue")(a);e.exports=a}),null); __d("RTCWebUserActionsDebugTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:RTCWebUserActionsDebugLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:RTCWebUserActionsDebugLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:RTCWebUserActionsDebugLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setCallID=function(a){this.$1.call_id=a;return this};c.setCallType=function(a){this.$1.call_type=a;return this};c.setCheckpoint=function(a){this.$1.checkpoint=a;return this};c.setClientTime=function(a){this.$1.client_time=a;return this};c.setCodebaseVersion=function(a){this.$1.codebase_version=a;return this};c.setComponent=function(a){this.$1.component=a;return this};c.setConferenceName=function(a){this.$1.conference_name=a;return this};c.setConferenceState=function(a){this.$1.conference_state=a;return this};c.setDeviceID=function(a){this.$1.device_id=a;return this};c.setErrorDomain=function(a){this.$1.error_domain=a;return this};c.setErrorType=function(a){this.$1.error_type=a;return this};c.setEvent=function(a){this.$1.event=a;return this};c.setEventTimeElapsed=function(a){this.$1.event_time_elapsed=a;return this};c.setIsCaller=function(a){this.$1.is_caller=a;return this};c.setMediaType=function(a){this.$1.media_type=a;return this};c.setPage=function(a){this.$1.page=a;return this};c.setSurface=function(a){this.$1.surface=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setVC=function(a){this.$1.vc=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};return a}();c={call_id:!0,call_type:!0,checkpoint:!0,client_time:!0,codebase_version:!0,component:!0,conference_name:!0,conference_state:!0,device_id:!0,error_domain:!0,error_type:!0,event:!0,event_time_elapsed:!0,is_caller:!0,media_type:!0,page:!0,surface:!0,time:!0,vc:!0,weight:!0};e.exports=a}),null); __d("RTCWebUserActionsTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:RTCWebUserActionsLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:RTCWebUserActionsLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:RTCWebUserActionsLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setCallID=function(a){this.$1.call_id=a;return this};c.setCallType=function(a){this.$1.call_type=a;return this};c.setCheckpoint=function(a){this.$1.checkpoint=a;return this};c.setClientTime=function(a){this.$1.client_time=a;return this};c.setCodebaseVersion=function(a){this.$1.codebase_version=a;return this};c.setComponent=function(a){this.$1.component=a;return this};c.setConferenceName=function(a){this.$1.conference_name=a;return this};c.setConferenceState=function(a){this.$1.conference_state=a;return this};c.setDeviceID=function(a){this.$1.device_id=a;return this};c.setErrorDomain=function(a){this.$1.error_domain=a;return this};c.setErrorType=function(a){this.$1.error_type=a;return this};c.setEvent=function(a){this.$1.event=a;return this};c.setEventTimeElapsed=function(a){this.$1.event_time_elapsed=a;return this};c.setIsCaller=function(a){this.$1.is_caller=a;return this};c.setMediaType=function(a){this.$1.media_type=a;return this};c.setPage=function(a){this.$1.page=a;return this};c.setSurface=function(a){this.$1.surface=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setVC=function(a){this.$1.vc=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};return a}();c={call_id:!0,call_type:!0,checkpoint:!0,client_time:!0,codebase_version:!0,component:!0,conference_name:!0,conference_state:!0,device_id:!0,error_domain:!0,error_type:!0,event:!0,event_time_elapsed:!0,is_caller:!0,media_type:!0,page:!0,surface:!0,time:!0,vc:!0,weight:!0};e.exports=a}),null); __d("RTWebUserActionLogger",["CurrentUser","FBRTCConsoleLogger","FBRTCSupport","RTCWebUserActionsDebugTypedLogger","RTCWebUserActionsTypedLogger","RTWebLoggingSharedInstance","immutable","performanceNow"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("immutable").Map;a=function(){__p&&__p();function a(){this.$2=g(),this.$3=new Set(),this.$4=new Set(),this.$5=b("RTWebLoggingSharedInstance").getInstance().getDeviceID(),this.$6=this.$7(),this.clearCache()}var c=a.prototype;c.clearCache=function(){this.$1={callID:void 0,callType:void 0,mediaType:void 0,conferenceName:void 0,conferenceState:void 0}};c.logImpression=function(a){this.logEvent(babelHelpers["extends"]({eventName:"impression"},a))};c.logPreCallImpression=function(a){this.clearCache(),this.logImpression(a)};c.logPreCallClick=function(a){this.clearCache(),this.logClick(a)};c.logClick=function(a){this.logEvent(babelHelpers["extends"]({eventName:"tap"},a))};c.logError=function(a){this.logEvent(babelHelpers["extends"]({eventName:"error"},a))};c.startTimer=function(a){var c=b("performanceNow")();this.$2=this.$2.set(a,c);this.logCheckpoint({checkpoint:a+"_timerStart"});this.$8(a,{startTime:c})};c.logStopTimer=function(a){var b=a.checkpointName===void 0?a.timerName:a.checkpointName,c=a.event||{};c.timeElapsed=this.$9(a.timerName);this.logCheckpoint(babelHelpers["extends"]({checkpoint:b+"_timerEnd"},c));return c.timeElapsed};c.logCheckpoint=function(a){this.logEvent(babelHelpers["extends"]({eventName:"checkpoint"},a))};c.$10=function(a){return a===null||a===void 0};c.logEvent=function(a){__p&&__p();var b=this.$1;b.callID=this.$10(a.callID)?b.callID:a.callID;b.callType=a.callType||b.callType;b.conferenceState=a.conferenceState||b.conferenceState;b.conferenceName=this.$10(a.conferenceName)?b.conferenceName:a.conferenceName;b.isCaller=a.isCaller==null?b.isCaller:a.isCaller;b.mediaType=a.mediaType||b.mediaType;this.$11(a,b);b=this.$12(a,b);this.$8(a.eventName,b)};c.$12=function(a,c){var d=new(b("RTCWebUserActionsTypedLogger"))();d.setCallType(c.callType).setDeviceID(this.$5).setClientTime(Date.now()).setErrorDomain(a.errorDomain).setErrorType(a.errorType).setComponent(a.component).setConferenceState(c.conferenceState).setEvent(a.eventName).setMediaType(c.mediaType).setPage(this.$6).setCallID(c.callID).setConferenceName(c.conferenceName).setSurface(a.surface).setCheckpoint(a.checkpoint).setEventTimeElapsed(a.timeElapsed).setIsCaller(c.isCaller).setCodebaseVersion("Old Codebase").log();return d.getData()};c.$11=function(a,c){var d=new(b("RTCWebUserActionsDebugTypedLogger"))();d.setCallType(c.callType).setDeviceID(this.$5).setClientTime(Date.now()).setErrorDomain(a.errorDomain).setErrorType(a.errorType).setComponent(a.component).setConferenceState(c.conferenceState).setEvent(a.eventName).setMediaType(c.mediaType).setPage(this.$6).setCallID(c.callID).setConferenceName(c.conferenceName).setSurface(a.surface).setCheckpoint(a.checkpoint).setEventTimeElapsed(a.timeElapsed).setIsCaller(c.isCaller).setCodebaseVersion("Old Codebase").log();return d.getData()};c.getCallType=function(a,b){b===void 0&&(b=!1);if(a===null||a===void 0)return null;if(a)return"mw";else if(b)return"escalated";else return"p2p"};c.getAudioVideoComponent=function(a){return a===null||a===void 0?null:a?"audio_button":"video_button"};c.getMediaType=function(a,b){b===void 0&&(b=!1);if(b)return"escalated";else if(a)return"audio";else return"video"};c.logErrorOnceforDomain=function(a,b){this.$3.has(a)||(this.$3.add(a),this.logError({errorDomain:a,errorType:b.toString()}))};c.logCheckpointOnceForDomain=function(a){var b=a.checkpoint;this.$4.has(b)||(this.$4.add(b),this.logCheckpoint(a))};c.clearLoggedDomains=function(){this.$3.clear(),this.$4.clear()};c.getWebLoggerInfoFromStore=function(a){a=a.callInfo;var b=a.callID,c=a.conferenceName;a=a.conferenceState;return{callID:b,conferenceName:c,conferenceState:a}};c.$7=function(){__p&&__p();if(b("FBRTCSupport").isMobileDevice())return"mweb";else if(b("CurrentUser").isWorkUser())return"workplace";var a=window.location.hostname;if(a.search("facebook")!==-1)return"facebook";else if(a.search("messenger")!==-1)return"messenger_dot_com";return a};c.$9=function(a){var c=this.$2.get(a);if(c){this.$2=this.$2.remove(a);return parseInt(b("performanceNow")()-c,10)}return null};c.$8=function(a,c){a=a==null?"null":a;b("FBRTCConsoleLogger").getInstance().getLogHistory().log(a,JSON.stringify(c))};return a}();e.exports=new a()}),null); __d("generateRTCCallID",["randomInt"],(function(a,b,c,d,e,f){"use strict";function a(){return b("randomInt")(0,4294967294)+1}e.exports=a}),null); __d("FBRTCCore",["invariant","Bootloader","FBLogger","FBRTCAvailability","FBRTCCallUIWrapper","FBRTCSupport","RTWebCallTriggerMapping","RTWebUserActionLogger","generateRTCCallID","setTimeout"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=!1;a={startOutgoingCall:function(a,c,d,e){__p&&__p();e===void 0&&(e=!1);/\D/.test(a)&&g(0,2478);var f=b("generateRTCCallID")(),i=b("RTWebCallTriggerMapping")[c];(i===null||i===void 0)&&b("FBLogger")("rtweb").mustfix("Unexpected or unknown call trigger: %s",c);b("RTWebUserActionLogger").logPreCallClick(babelHelpers["extends"]({},i,{callID:f.toString(),mediaType:b("RTWebUserActionLogger").getMediaType(d),callType:"p2p"}));if(h)return;h=!0;b("setTimeout")(function(){h=!1},1e3);e&&!b("FBRTCSupport").isCollabSupported()?b("Bootloader").loadModules(["FBRTCUnsupportedBrowserMessage","CollabMessengerLogger"],function(b,c){b.showForUnsupportedCollabCall(),c.logBrowserNotSupported({peerID:a})},"FBRTCCore"):!b("FBRTCSupport").isWebrtcSupported()?b("Bootloader").loadModules(["FBRTCUnsupportedBrowserMessage"],function(a){a.showForOutgoingCall(),b("RTWebUserActionLogger").logError({callID:f.toString(),callType:"p2p",mediaType:b("RTWebUserActionLogger").getMediaType(d),errorDomain:"unsupported browser"})},"FBRTCCore"):b("FBRTCCallUIWrapper").openAsCaller(a,f,c,d)},startGroupCall:function(a){__p&&__p();var c=a.conferenceName,d=a.hasVideo,e=a.serverInfoData,f=a.trigger;a=a.usersToRing;a=a===void 0?[]:a;if(h)return;h=!0;b("setTimeout")(function(){h=!1},1e3);if(!b("FBRTCSupport").isGroupCallWebtrcSupported()){b("Bootloader").loadModules(["MessengerRTCUnsupportedBrowserDialogController"],function(a){b("RTWebUserActionLogger").logError({callType:"mw",conferenceName:c,mediaType:b("RTWebUserActionLogger").getMediaType(!d),errorDomain:"unsupported browser"}),a.render({hasVideo:d,isGroupCall:!0})},"FBRTCCore");return}b("FBRTCCallUIWrapper").openGroupCallUI(c,b("generateRTCCallID")(),a,d,d,f,e)},isAvailableForWebrtcCalling:function(a){return b("FBRTCAvailability").isCallable(a)}};e.exports=a}),null); __d("RTWebStrings",["fbt"],(function(a,b,c,d,e,f,g){"use strict";a={busy:g._("Busy"),callAgain:g._("Call Again"),callEnded:g._("Call Ended"),callFailed:g._("Call Failed"),callInterrupted:g._("Call Interrupted"),cannotConnect:g._("Can't Connect Call"),chatLinksLeftVideoChat:g._("You left the group video chat"),clientEncryptionError:g._("Client Encryption Error"),close:g._("Close"),connected:g._("Connected"),connecting:g._("Connecting..."),connectionDropped:g._("Connection Dropped"),connectionLost:g._("Connection Lost"),contacting:g._("Contacting..."),copiedVideoChatLink:g._("Copied"),copyVideoChatLink:g._("Copy Video Chat Link"),disconnected:g._("Disconnected"),dismiss:g._("Dismiss"),hangingUp:g._("Hanging up..."),inactive:g._("Call is Inactive"),inAnotherCall:g._("In Another Call"),incomingVideoChat:g._("Incoming video chat"),invalidStreamConfiguration:g._("Too many clients connected to the room"),noAnswer:g._("No Answer"),notNow:g._("Not Now"),participantLimitReached:g._("Participant Limit Reached"),pleaseWait:g._("Please wait..."),profilePictureAlt:g._("Profile Picture"),reconnecting:g._("Reconnecting..."),redial:g._("Redial"),ringing:g._("Ringing..."),switchToWiFi:g._("Switch to Wi-Fi to complete your call"),unreachable:g._("Unreachable"),userVideoOff:function(a){return g._("{name}'s camera is off",[g._param("name",a)])},viewerVideoOff:g._("Your camera is off"),waitingForOthers:g._("Waiting for others to join...")};e.exports=a}),null); __d("RTCUserRecord",["immutable"],(function(a,b,c,d,e,f){"use strict";a=b("immutable").Record({FBID:"UNDEFINED",isGuestUser:!1,isMessengerUser:!1,isPartiesUser:!1,lastConnectedAt:0,participantState:null,profilePictureUrl:null,profileUrl:null,roomLocation:null,screenStreams:b("immutable").Set(),streams:b("immutable").Set(),userName:"",userShortName:"",vanity:""});c=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}return b}(a);e.exports=c}),null); __d("RTCUser",["FBRTCConstants","FBRTCParticipantCallState","RTCUserRecord","immutable","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("FBRTCConstants").MediaContentTypes;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.clone=function(){return new c(this.toObject())};d.setParticipantState=function(a){return(!this.participantState||this.participantState.state!==b("FBRTCParticipantCallState").CONNECTED)&&a.state===b("FBRTCParticipantCallState").CONNECTED?this.set("participantState",a).set("lastConnectedAt",Date.now()):!this.participantState||this.participantState.state!==a.state?this.set("participantState",a):this};d.getParticipantState=function(){return this.participantState&&this.participantState.state};d.hasAudio=function(){return this.getAllStreamAudioTracks().some(function(a){return a.length>0})};d.hasVideo=function(){return this.streams.some(function(a){return a.getVideoTracks().length>0})};d.hasLiveVideoTracks=function(){return this.streams.some(function(a){return a.getVideoTracks().some(function(a){return a.readyState==="live"})})};d.isAudioMuted=function(){var a=this;return!this.hasAudio()?!0:this.getAllStreamAudioTracks().every(function(b){return a.areAllTracksMuted(b)})};d.isVideoMuted=function(){var a=this;return!this.hasVideo()?!0:this.streams.every(function(b){return a.areAllTracksMuted(b.getVideoTracks())})};d.areAllTracksMuted=function(a){return!a.some(function(a){return a.enabled})};d.hasFunctioningVideoTrack=function(){return!this.hasVideo()?!1:this.streams.every(function(a){return a.getVideoTracks().some(function(a){return a.enabled&&!a.muted})})};d.toggleMuteAudio=function(a){var b=this;this.getAllStreamAudioTracks().forEach(function(a){return b.$RTCUser1(a)});return this.clone()};d.toggleMuteVideo=function(a){var b=this;this.streams.forEach(function(c){b.$RTCUser1(c.getVideoTracks(),a)});return this.clone()};d.stopVideo=function(){var a=this;this.streams.forEach(function(b){b.getVideoTracks().forEach(function(c){a.$RTCUser1(b.getVideoTracks(),!0),c.readyState!=="ended"&&(c.onended&&c.onended(),c.stop())})});return this.clone()};d.getAllStreamAudioTracks=function(){return this.streams.concat(this.screenStreams).map(function(a){return a.getAudioTracks()})};d.hasStream=function(){return!this.streams.isEmpty()};d.addStream=function(a){return this.set("streams",this.streams.add(b("nullthrows")(a)))};d.removeStream=function(a){return this.set("streams",this.streams["delete"](a))};d.getStream=function(){return this.hasStream()?this.streams.first():null};d.getActiveStream=function(){return this.hasStream()?this.streams.find(function(a){return"active"in a&&a.active}):null};d.replaceStream=function(a,b){return!this.streams.contains(a)?this:this.set("streams",this.streams["delete"](a).add(b))};d.removeAllStreams=function(){return this.set("streams",b("immutable").Set())};d.getScreenStream=function(){return this.screenStreams&&this.hasScreenStream()?this.screenStreams.first():null};d.hasScreenStream=function(){return!this.screenStreams.isEmpty()};d.addScreenStream=function(a){return this.set("screenStreams",this.screenStreams.add(a))};d.removeScreenStream=function(a){return this.set("screenStreams",this.screenStreams["delete"](a))};d.removeAllScreenStreams=function(){return this.set("screenStreams",b("immutable").Set())};d.replaceScreenStream=function(a,b){if(!this.screenStreams.contains(a))return this;return a===b?this:this.set("screenStreams",this.screenStreams.add(b)["delete"](a))};d.setRoomLocation=function(a){return this.set("roomLocation",a)};d.getRoomLocation=function(){return this.roomLocation};d.$RTCUser1=function(a,b){var c=b!=null?!b:this.areAllTracksMuted(a);a.forEach(function(a){return a.enabled=c})};d.getMediaTypeForTracks=function(){var a=new Map(),b=this.getScreenStream();b&&b.getVideoTracks().forEach(function(b){return a.set(b.id,g.SCREEN)});return a};return c}(b("RTCUserRecord"));e.exports=a}),null); __d("RTCCallTitle.react",["MercuryIDs","MercuryParticipantListRenderer","React","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();var c=a.displayViewerName,d=a.viewer,e=a.participants;a=a.className;var f=b("MercuryIDs").getParticipantIDFromUserID(d);d=Object.keys(e.toJS());d.length>1&&(d=d.filter(function(a){return a!==f||c}));d=d.map(function(a){return e.get(a)});d=new(b("MercuryParticipantListRenderer"))().setUseShortName(!1).setUseAndSeparator(!1).renderParticipantList(d);return b("React").createElement("span",{className:a},d)};e.exports=a}),null); __d("MessengerPopoverMenu.react",["cx","ContextualDialogArrow","ContextualLayerAutoFlip","ContextualLayerUpdateOnScroll","PopoverMenu.react","React","joinClasses"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.showPopover=function(){this.refs.menu&&this.refs.menu.showPopover()};d.render=function(){var a=this.props,c=a.children,d=a.className,e=a.isOpen;a=babelHelpers.objectWithoutPropertiesLoose(a,["children","className","isOpen"]);c=b("React").Children.only(c);return b("React").createElement(b("PopoverMenu.react"),babelHelpers["extends"]({className:b("joinClasses")(d,!a.disableArrowKeyActivation||e?"_150g":""),enableActivationOnEnter:!0,layerBehaviors:[b("ContextualLayerAutoFlip"),b("ContextualLayerUpdateOnScroll"),b("ContextualDialogArrow")]},a,{ref:"menu"}),c)};return c}(b("React").PureComponent);e.exports=a}),null); __d("MessengerContentSearchFunnelLoggerConstants",[],(function(a,b,c,d,e,f){"use strict";a=Object.freeze({BROWSE_MESSAGE_IN_THREAD:"browse_message_in_thread",CHANGE_QUERY:"change_query",END_CONTENT_SEARCH:"end_content_search",INITIATE_CONTENT_SEARCH:"initiate_content_search",LOAD_MORE_THREADS:"load_more_threads",NUM_BROWSE_ACTIONS_WITHIN_THREAD:"num_browse_actions_within_thread",SELECT_THREAD:"select_thread",THREAD_IMPRESSIONS:"thread_impressions",LOAD_MESSAGE_IN_THREAD:"load_message_in_thread",BROWSE_CONTEXT:"browse_context"});b=Object.freeze({SEARCH_FROM_INTEGRATED_MESSAGE_SEARCH:"search_from_integrated_message_search",SEARCH_WITHIN_THREAD:"search_within_thread",SEARCH_ALL_THREADS:"search_all_threads"});c=Object.freeze(babelHelpers["extends"]({},b,{END_WITH_DONE_BUTTON:"end_with_done_button",END_WITH_X_BUTTON:"end_with_x_button",END_WITH_BACK_BUTTON:"end_with_back_button",END_BY_CHANGING_THREADS:"end_by_changing_threads"}));e.exports={FUNNEL_NAME:"WWW_MESSENGER_CONTENT_SEARCH_FUNNEL",FUNNEL_LOGGER_EVENTS:a,FUNNEL_LOGGER_TAGS:c,ENTRY_SURFACES:b}}),null); __d("MessengerRTCGroupCallContactListItem.react",["cx","fbt","ix","FBRTCParticipantCallState","Image.react","Link.react","MessengerContactImageReact.bs","React","RTWebStrings","emptyFunction"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("MessengerContactImageReact.bs").jsComponent,k=(a={},a[b("FBRTCParticipantCallState").DISCONNECTED]=b("RTWebStrings").disconnected,a[b("FBRTCParticipantCallState").NO_ANSWER]=b("RTWebStrings").noAnswer,a[b("FBRTCParticipantCallState").REJECTED]=b("RTWebStrings").noAnswer,a[b("FBRTCParticipantCallState").UNREACHABLE]=b("RTWebStrings").unreachable,a[b("FBRTCParticipantCallState").CONNECTION_DROPPED]=b("RTWebStrings").connectionDropped,a[b("FBRTCParticipantCallState").CONTACTING]=b("RTWebStrings").contacting,a[b("FBRTCParticipantCallState").RINGING]=b("RTWebStrings").ringing,a[b("FBRTCParticipantCallState").CONNECTING]=b("RTWebStrings").connecting,a[b("FBRTCParticipantCallState").CONNECTED]=b("RTWebStrings").connected,a[b("FBRTCParticipantCallState").PARTICIPANT_LIMIT_REACHED]=b("RTWebStrings").participantLimitReached,a[b("FBRTCParticipantCallState").IN_ANOTHER_CALL]=b("RTWebStrings").inAnotherCall,a),l=32;c=function(a){var c=a.isSelected,d=a.onClick,e=a.user,f=a.dataTestID;a=a.participantState;return b("React").createElement(b("Link.react"),{"aria-checked":c,className:"_4nvn",onClick:o(a)?b("emptyFunction"):d,"data-testid":f,role:"checkbox"},b("React").createElement(j,{className:"_4nvr",isMessengerUser:e.isMessengerUser,isPartiesUser:e.isPartiesUser,size:l,src:e.profilePictureUrl}),b("React").createElement("div",{className:"_4nvs"},b("React").createElement("div",{className:"_4nvt"},b("React").createElement("div",{className:"_4nv_"},e.userName),b("React").createElement(m,{user:e,participantState:a})),b("React").createElement(n,{isSelected:c,participantState:a})))};var m=function(a){var c=a.user;a=a.participantState;if(a){a=k[a.state]||h._("Unknown");return b("React").createElement("div",{className:"_4nw0"},a)}return c.vanity?b("React").createElement("div",{className:"_4nw0"},"@",c.vanity):null},n=function(a){var c=a.isSelected;a=a.participantState;if(o(a))return b("React").createElement("div",{className:"_1j79"},h._("In Call"));else if(c)return b("React").createElement("div",{className:"_1j79"},b("React").createElement(b("Image.react"),{src:i("86852")}));return null};function o(a){if(!a)return!1;switch(a.state){case b("FBRTCParticipantCallState").CONTACTING:case b("FBRTCParticipantCallState").RINGING:case b("FBRTCParticipantCallState").CONNECTING:case b("FBRTCParticipantCallState").CONNECTED:return!0;default:return!1}}e.exports=c}),null); __d("MessengerRTCGroupCallContactList.react",["cx","MessengerRTCGroupCallContactListItem.react","MessengerScrollableArea.react","React","immutable"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){var c=a.isParticipantSelected,d=a.onClick,e=a.remoteUsers;a=a.participantStates;var f=a===void 0?b("immutable").Map():a;a=e.map(function(a){return b("React").createElement(b("MessengerRTCGroupCallContactListItem.react"),{isSelected:c.get(a.FBID),key:a.FBID,onClick:function(){return d(a.FBID)},user:a,dataTestID:"RTCPickerDialogContactListItem"+a.FBID,participantState:f.get(a.FBID)})});return b("React").createElement(b("MessengerScrollableArea.react"),{className:"_12zw"},a)};e.exports=a}),null); __d("MessengerRTCGroupCallRingParticipantsRow.react",["cx","fbt","React","intlList"],(function(a,b,c,d,e,f,g,h){"use strict";a=function(a){a=a.names;return b("React").createElement("div",{className:"_1wsd"},b("React").createElement("div",{className:"_1wse"},h._("Ring:")),b("React").createElement("div",{className:"_1wsg"},b("intlList")(a,b("intlList").CONJUNCTIONS.NONE)))};e.exports=a}),null); __d("MessengerRTCGroupCallThreadRow.react",["cx","fbt","MercuryParticipantsImage.react","MercuryThreadTitle_DEPRECATED.react","MessengerProfileImageWrapperReact.bs","MessengerThreadImageReact.bs","React","RTCCallTitle.react"],(function(a,b,c,d,e,f,g,h){"use strict";var i=b("MessengerProfileImageWrapperReact.bs").jsComponent,j=b("MessengerThreadImageReact.bs").jsComponent,k=function(){return b("React").createElement("div",{className:"_1apf"},h._("People you add to this group video will see previous messages in this conversation."))},l=function(){return b("React").createElement("div",{className:"_1ydy"},h._("You are about to ring people you've blocked."))};a=function(a){var c=a.thread,d=a.displayAddMemberWarning,e=a.displayBlockedMemberWarning,f=a.participants,g=a.viewerID;babelHelpers.objectWithoutPropertiesLoose(a,["thread","displayAddMemberWarning","displayBlockedMemberWarning","participants","viewerID"]);return b("React").createElement("div",{className:"_5y31"},c&&c.image_src?b("React").createElement(j,{className:"_5y32",participants:f,thread:c,viewer:g}):b("React").createElement(i,{className:"_5y32",showBadge:!1},b("React").createElement(b("MercuryParticipantsImage.react"),{participants:Object.keys(f.toJS()),size:50})),b("React").createElement("div",{className:"_5y34"},c&&c.name?b("React").createElement(b("MercuryThreadTitle_DEPRECATED.react"),{className:"_5y37",thread:c,viewer:g}):b("React").createElement(b("RTCCallTitle.react"),{className:"_5y37",participants:f,viewer:g}),d?b("React").createElement(k,null):null,e?b("React").createElement(l,null):null))};e.exports=a}),null); __d("MessengerRTCGroupCallParticipantsPickerDialog.react",["cx","fbt","invariant","FBRTCCore","ImmutableObject","MessengerDialog.react","MessengerDialogButton.react","MessengerDialogCancelButton.react","MessengerDialogHeaderReact.re","MessengerDialogTitleReact.re","MessengerRTCGroupCallContactList.react","MessengerRTCGroupCallRingParticipantsRow.react","MessengerRTCGroupCallThreadRow.react","React","RTCUser","RTWebUserActionLogger","URI","gkx","immutable"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("MessengerDialogHeaderReact.re").make,k=b("MessengerDialogTitleReact.re").make;a=b("React").PropTypes;var l=460,m=5;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.state={isParticipantSelected:d.props.participants.mapEntries(function(a){var b=a[0];a=a[1];return[a.fbid?a.fbid:b,d.props.participants.size<=m]})};d.$3=function(){b("RTWebUserActionLogger").logPreCallClick({mediaType:b("RTWebUserActionLogger").getMediaType(!d.props.hasVideo),callType:"mw",conferenceName:d.props.conferenceName,surface:"group_call_participant_picker_dialog",component:"cancel_button"})};d.$6=function(a){var c=!d.state.isParticipantSelected.get(a);d.setState(function(b){return{isParticipantSelected:b.isParticipantSelected.set(a,c)}});b("RTWebUserActionLogger").logPreCallClick({mediaType:b("RTWebUserActionLogger").getMediaType(!d.props.hasVideo),callType:"mw",conferenceName:d.props.conferenceName,surface:"group_call_participant_picker_dialog",component:c?"participant_row_select":"participant_row_unselect"})};d.$4=function(){var a=d.$2().map(function(a){return a.fbid});b("RTWebUserActionLogger").logPreCallClick({mediaType:b("RTWebUserActionLogger").getMediaType(!d.props.hasVideo),callType:"mw",conferenceName:d.props.conferenceName,surface:"group_call_participant_picker_dialog",component:"start_call_button"});d.props.handleCall?d.props.handleCall(a):b("FBRTCCore").startGroupCall({conferenceName:d.props.conferenceName,hasVideo:d.props.hasVideo,trigger:d.props.trigger,usersToRing:a});d.props.onUnmount()};c=d.props.participants.valueSeq().toArray().map(function(a){var c=a.big_image_src||a.image_src;a.fbid||i(0,1174);return new(b("RTCUser"))({FBID:a.fbid,profileUrl:new(b("URI"))(a.href),profilePictureUrl:c,isMessengerUser:!!a.is_messenger_user,isPartiesUser:!!a.is_parties_user,userName:a.name,userShortName:a.short_name,vanity:a.vanity||""})});d.$1=c.sort(function(a,b){return a.userName.localeCompare(b.userName)});return d}var d=c.prototype;d.componentDidMount=function(){b("RTWebUserActionLogger").logPreCallImpression({mediaType:b("RTWebUserActionLogger").getMediaType(!this.props.hasVideo),callType:"mw",conferenceName:this.props.conferenceName,surface:"group_call_participant_picker_dialog"}),b("RTWebUserActionLogger").logImpression({surface:"group_call_participant_picker_dialog",component:"cancel_button"}),b("RTWebUserActionLogger").logImpression({surface:"group_call_participant_picker_dialog",component:"start_call_button"})};d.render=function(){var a=this,c=this.props,d=c.participants,e=c.thread;c=c.viewerID;var f=this.$2();return b("React").createElement(b("MessengerDialog.react"),{onToggle:function(){a.props.onUnmount&&a.props.onUnmount()},type:"default",width:l},b("React").createElement("div",{className:"_2m1r"},b("React").createElement(j,null,b("React").createElement(b("MessengerDialogCancelButton.react"),{onClick:this.$3,dataTestID:"RTCPickerDialogCancelButton"}),b("React").createElement(k,{autofocus:!0},h._("Call group members")),b("React").createElement(b("MessengerDialogButton.react"),{label:h._("Call"),onClick:this.$4,dataTestID:"RTCPickerDialogCallButton",disabled:f.length===0,type:"primary",use:"default"})),b("React").createElement(b("MessengerRTCGroupCallThreadRow.react"),{displayBlockedMemberWarning:b("gkx")("678352")?this.$5(f):!1,participants:d,thread:e,viewerID:c}),b("React").createElement(b("MessengerRTCGroupCallRingParticipantsRow.react"),{names:f.map(function(a){a=a.name;return a}).sort(function(a,b){return a.localeCompare(b)})}),b("React").createElement(b("MessengerRTCGroupCallContactList.react"),{remoteUsers:this.$1,isParticipantSelected:this.state.isParticipantSelected,onClick:this.$6})))};d.$5=function(a){return a.some(function(a){return a.is_messenger_blocked||a.is_facebook_blocked})};d.$2=function(){var a=this;return this.props.participants.filter(function(b,c){return a.state.isParticipantSelected.get(b.fbid?b.fbid:c)}).toArray()};return c}(b("React").Component);c.propTypes={participants:a.instanceOf(b("immutable").Map).isRequired,thread:a.instanceOf(b("ImmutableObject")),viewerID:a.string.isRequired,trigger:a.string.isRequired,conferenceName:a.string.isRequired,hasVideo:a.bool.isRequired,handleCall:a.func,onUnmount:a.func.isRequired};e.exports=c}),null); __d("MessengerRTCGroupCallParticipantsPickerDialogController",["DOM","MessengerRTCGroupCallParticipantsPickerDialog.react","React","ReactDOM"],(function(a,b,c,d,e,f){"use strict";a={_container:b("DOM").create("div"),render:function(a){var c=this,d=a.participants,e=a.thread,f=a.viewerID,g=a.trigger,h=a.conferenceName,i=a.hasVideo;a=a.handleCall;b("ReactDOM").render(b("React").createElement(b("MessengerRTCGroupCallParticipantsPickerDialog.react"),{participants:d,thread:e,viewerID:f,trigger:g,conferenceName:h,hasVideo:i,handleCall:a,onUnmount:function(){return c._onUnmount()}}),this._container)},_onUnmount:function(){b("ReactDOM").unmountComponentAtNode(this._container)}};e.exports=a}),null); __d("MessengerBootloadedSecondarySearchLogger",["Bootloader","MessengerSecondarySearchFunnelConstants","gkx"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=[],h="",i={LOCAL_CONTACTS:[],ORDERED_GCF_FRIENDLIST:[],SHORT_PROFILES:[],SUGGESTED_RECIPIENTS:[]},j=!1,k=!1;c=b("MessengerSecondarySearchFunnelConstants").EVENTS;var l=c.CLICK_OTHER_THREAD,m=c.END,n=c.IMPRESSIONS,o=c.START,p=c.QUERY_CHANGED,q=c.RESULT_SELECTED,r=c.SOURCE_ENDED,s=c.SOURCE_STARTED,t=c.TOKEN_REMOVED;d=b("MessengerSecondarySearchFunnelConstants").END_ACTIONS;var u=d.ABANDON,v=d.SINGLE_RESULT_SELECTED;f=b("MessengerSecondarySearchFunnelConstants").SOURCES;var w=f.SERVER,x=f.SHORT_PROFILES,y=f.SUGGESTED_RECIPIENTS,z=f.LOCAL_CONTACTS,A=f.LOCAL_AND_SERVER,B=f.ORDERED_GCF_FRIENDLIST,C=b("MessengerSecondarySearchFunnelConstants").ENTRY_SURFACES.COMPOSER;function D(a){if(i.SUGGESTED_RECIPIENTS.includes(a))return y;else if(i.ORDERED_GCF_FRIENDLIST.includes(a))return B;else if(i.SHORT_PROFILES.includes(a))return x;else if(i.LOCAL_CONTACTS.includes(a))return z;else return w}function a(a){__p&&__p();if(!b("gkx")("678592"))return;b("Bootloader").loadModules(["MessengerSecondarySearchFunnelLogger"],function(c){__p&&__p();switch(a.name){case o:if(a.surface===C&&k===!0){c.reenterSearch(a.loggingID);break}j=!1;i={LOCAL_CONTACTS:[],ORDERED_GCF_FRIENDLIST:[],SHORT_PROFILES:[],SUGGESTED_RECIPIENTS:[]};c.startFunnel(a.client,a.surface,a.surface,null,a.loggingID);a.surface===C&&(k=!0);break;case m:var d=a.end_reason;a.surface===b("MessengerSecondarySearchFunnelConstants").SEARCH_SURFACES.BROADCAST&&(d=j?v:u);c.endFunnel(b("MessengerSecondarySearchFunnelConstants").END_REASONS.ACTION,d,a.loggingID,a.threadID,a.isNewThread);k=!1;break;case n:d=a.entries.map(function(a){a.data_source=[D(a.result_fbid)];return a});g=a.entries.map(function(a){return a.result_fbid});c.impressions(a.query,d,A,a.loggingID);break;case p:h=a.query;c.queryChanged(a.query,a.loggingID);break;case q:j=!0;d=D(a.id);var e=g.indexOf(a.id);c.resultSelected(a.id,e,a.type,a.query?a.query:h,d,a.surface,a.loggingID,a.selectionType);break;case r:e=!a.query||a.query===h;switch(a.source){case z:i.LOCAL_CONTACTS=a.ids?a.ids:[];break;case y:i.SUGGESTED_RECIPIENTS=a.ids?a.ids:[];break;case x:i.SHORT_PROFILES=a.ids?a.ids:[];e=!0;break;case B:i.ORDERED_GCF_FRIENDLIST=a.ids?a.ids:[];e=!0;break;default:break}c.sourceEnded(a.query,a.numResults,a.source,a.status,e,a.loggingID);break;case s:c.sourceStarted(a.query,a.source,a.loggingID);break;case t:c.tokenRemoved(a.deletedIDs,a.clearedAll,a.loggingID);break;case l:c.unfocusSearch(a.loggingID);break}},"MessengerBootloadedSecondarySearchLogger")}e.exports={logSearchEvent:a}}),null); __d("MessengerDiscoveryEntryPointsLoggingHelper",["MessengerDiscoveryEntryPoint"],(function(a,b,c,d,e,f){"use strict";a={getEntryPointsLoggingTagStr:function(a){if(a.length==0||Object.values(b("MessengerDiscoveryEntryPoint")).indexOf(a[0])==-1)throw new Error("Please use enums in MessengerDiscoveryEntryPoints class");return"entrypoint:"+a.join(":")}};e.exports=a}),null); __d("PagesHelpTrayActions",["Arbiter"],(function(a,b,c,d,e,f){a={changeTab:function(){b("Arbiter").inform("tabChange")}};e.exports=a}),null); __d("StoreAndPropBasedStateMixin",["invariant","FluxMixinLegacyInstrumentation","StoreBasedStateMixinHelper","setImmediate"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(){__p&&__p();for(var a=arguments.length,c=new Array(a),d=0;d=0},_hasShare:function(a){return a.length===1&&a[0].attach_type==="share"},_hasError:function(a){return a.length===1&&a[0].attach_type==="error"},_hasGift:function(a){return a.length===1&&a[0].attach_type==="gift"},_hasFile:function(a){return a.length===1&&a[0].attach_type==="file"},_getPhotoAttachments:function(a){return!a?[]:a.filter(function(a){return a.attach_type==="photo"})},_getAnimatedImageAttachments:function(a){return!a?[]:a.filter(function(a){return a.attach_type==="animated_image"})},_renderPhotoAttachmentSnippetText:function(a,b,c){if(c.length===1)if(a)return g._("You sent a photo.");else return g._("{name} sent a photo.",[g._param("name",b)]);else if(a)return g._({"*":"You sent {num_photos} photos."},[g._param("num_photos",c.length,[0])]);else return g._({"*":"{name} sent {num_photos} photos."},[g._param("name",b),g._param("num_photos",c.length,[0])])},_renderAnimatedImagesAttachmentSnippetText:function(a,b,c){if(c.length===1)if(a)return g._("You sent a GIF.");else return g._("{name} sent a GIF.",[g._param("name",b)]);else if(a)return g._("You sent {num_animated_images} GIFs.",[g._param("num_animated_images",c.length)]);else return g._("{name} sent {num_animated_images} GIFs.",[g._param("name",b),g._param("num_animated_images",c.length)])},_renderBusinessMessageSnippetText:function(a,b){a=a.share.target;a=a&&a.message||g._("{sender name} sent an attachment.",[g._param("sender name",b)]);return a},_renderP2PPaymentSnippetText:function(a){a=a.share.target;return this.renderP2PPaymentSnippetText(b("CurrentUser").getID()===a.sender.id,a.sender.name,a.amountWithSymbol,a.status,b("CurrentUser").getID()===a.receiver.id,a.receiver.name)},_renderP2PPaymentRequestSnippetText:function(a){a=a.share.target;return this.renderP2PPaymentRequestSnippetText(b("CurrentUser").getID()===a.requester.id,a.requester.name,a.amountWithSymbol,a.currentStatus,b("CurrentUser").getID()===a.requestee.id,a.requestee.name)},renderP2PPaymentSnippetText:function(a,c,d,e,f,g){return b("P2PSnippetStringUtils").getTransferSnippetByStatus(e,a,f||!1,c||"",g||"",d)},renderP2PPaymentRequestSnippetText:function(a,c,d,e,f,g){return b("P2PSnippetStringUtils").getRequestSnippetByStatus(e,a,f||!1,c||"",g||"",d)}};e.exports=a}),null); __d("PhotosphereMetadata",["ImmutableRecordWithV4Types"],(function(a,b,c,d,e,f){"use strict";a=b("ImmutableRecordWithV4Types").Record;c=a({CroppedAreaImageHeightPixels:0,CroppedAreaImageWidthPixels:0,CroppedAreaLeftPixels:0,CroppedAreaTopPixels:0,FullPanoHeightPixels:0,FullPanoWidthPixels:0,InitialViewHeadingDegrees:0,InitialViewPitchDegrees:0,InitialViewRollDegrees:0,InitialViewVerticalFOVDegrees:0,PoseHeadingDegrees:0,PosePitchDegrees:0,PoseRollDegrees:0,PreProcessCropLeftPixels:0,PreProcessCropRightPixels:0,ProjectionType:"equirectangular",RendererProjectionType:"equirectangular"});e.exports={makePhotosphereMetadata:c}}),null); __d("SphericalPhotoUtils",["PhotoRendererProjection","PhotosphereMetadata","SphericalPhotoPartialLimits"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("PhotoRendererProjection").PERSPECTIVE,h=b("PhotosphereMetadata").makePhotosphereMetadata,i=b("SphericalPhotoPartialLimits").makePartialLimits,j={getMetadataFromGraphQLResult:function(a){return{CroppedAreaImageHeightPixels:a.cropped_area_image_height_pixels!=null?a.cropped_area_image_height_pixels.toString():null,CroppedAreaImageWidthPixels:a.cropped_area_image_width_pixels!=null?a.cropped_area_image_width_pixels.toString():null,CroppedAreaLeftPixels:a.cropped_area_left_pixels!=null?a.cropped_area_left_pixels.toString():null,CroppedAreaTopPixels:a.cropped_area_top_pixels!=null?a.cropped_area_top_pixels.toString():null,FullPanoHeightPixels:a.full_pano_height_pixels!=null?a.full_pano_height_pixels.toString():null,FullPanoWidthPixels:a.full_pano_width_pixels!=null?a.full_pano_width_pixels.toString():null,InitialViewHeadingDegrees:a.initial_view_heading_degrees!=null?a.initial_view_heading_degrees.toString():null,InitialViewPitchDegrees:a.initial_view_pitch_degrees!=null?a.initial_view_pitch_degrees.toString():null,InitialViewRollDegrees:a.initial_view_roll_degrees!=null?a.initial_view_roll_degrees.toString():null,InitialViewVerticalFOVDegrees:a.initial_view_vertical_fov_degrees!=null?a.initial_view_vertical_fov_degrees.toString():null,PoseHeadingDegrees:a.pose_heading_degrees!=null?a.pose_heading_degrees.toString():null,PosePitchDegrees:a.pose_pitch_degrees!=null?a.pose_pitch_degrees.toString():null,PoseRollDegrees:a.pose_roll_degrees!=null?a.pose_roll_degrees.toString():null,PreProcessCropLeftPixels:null,PreProcessCropRightPixels:null,ProjectionType:a.projection_type,RendererProjectionType:g}},calculatePartialLimits:function(a){__p&&__p();var b=a.FullPanoHeightPixels,c=a.FullPanoWidthPixels,d=a.CroppedAreaImageWidthPixels,e=a.CroppedAreaImageHeightPixels,f=a.CroppedAreaLeftPixels;a=a.CroppedAreaTopPixels;b=j.parseNumber(b);c=j.parseNumber(c);d=j.parseNumber(d);e=j.parseNumber(e);f=j.parseNumber(f);a=j.parseNumber(a);var g,h,k,l;if(d!==0&&d!==c){d=360*d/c;d<350&&(g=180*(1-2*f/c),h=d-g)}e!==0&&e!==b&&(a!==0&&(k=90*(1-2*a/b)),a+e!==b&&(l=180*(a+e-b/2)/b));f=null;c=null;d=null;a=null;k&&k<87.5&&(c=k);l&&l<87.5&&(f=l);g&&(d=g);h&&(a=h);return i({partialTopDegrees:c,partialBottomDegrees:f,partialLeftDegrees:d,partialRightDegrees:a})},parseNumber:function(a){return a?Number(a):0},getThumbnailsFromPhotoEncodings:function(a){a=a.find(function(a){return a.projection_type===g});var b=null,c=null;if(a&&a.thumbnails&&a.thumbnails.length>0){a=a.thumbnails;b=a[0]?a[0].uri:null;c=a[1]?a[1].uri:null}return{smallThumbnail:b,largeThumbnail:c}},photosphereMetadataStringToNumber:function(a){var b={};Object.keys(a).forEach(function(c){switch(c){case"ProjectionType":b.ProjectionType=a.ProjectionType;break;case"RendererProjectionType":b.RendererProjectionType=a.RendererProjectionType;break;default:b[c]=parseInt(a[c],10)}});return h(b)}};e.exports=j}),null);